package com.groupbuying.redpacket.constants;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @ClassName MqConstans
 * @Description: TODO   mq 常量
 * @Author srlg3
 * @Date 2019/11/27
 * @Version V1.0
 **/
@Component
public class MQConstans {

    public static final String ACCESS_KEY = "LTAIkLoCSLqX7QFG";
    public static final String SECRET_KEY = "anr8xwxEFrN4Rq0Gjw5MXxELuDb12V";
    public static final String NAMESRV_ADDR = "http://onsaddr.mq-internet-access.mq-internet.aliyuncs.com:80";

    /**红包添加金额队列 id*/
    public static String REDPACKET_ADDAMT_PRODUCERID;

    /**红包添加金额队列 topic*/
    public static String REDPACKET_ADDAMT_TOPIC;

    /**红包添加金额队列 tag*/
    public static String REDPACKET_ADDAMT_TAG;

    /**password加密密码*/
    public final static String PASSWORD = "QTczNkE0RDg4QjVCMzg0OTkxODIwNUY0NDA0MUVEQjQ=";

    @Value("${redPacket.addAmt.producerId}")
    public void setProducerId(String producerId) {
        REDPACKET_ADDAMT_PRODUCERID = producerId;
    }

    @Value("${redPacket.addAmt.topic}")
    public void setTopic(String topic) {
        REDPACKET_ADDAMT_TOPIC = topic;
    }

    @Value("${redPacket.addAmt.tag}")
    public void setTag(String tag) {
        REDPACKET_ADDAMT_TAG = tag;
    }
}
